// 页面路径：store/index.js 
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex); //vue的插件机制
//Vuex.Store 构造器选项
const store = new Vuex.Store({
	state: {
		version: "2.2.9",
		isBack: false,
		pushPage: true,
		commonData: {},
	},
	getters: {
		getIsBack: (state, getters) => {
			return state.isBack
		},
		getPushPage: (state, getters) => {
			return state.pushPage
		},
		getCommonData: (state, getters) => {
			return state.commonData
		}
	},
	mutations: {
		setIsBack(state, val) {
			state.isBack = val
		},
		setPushPage(state, val) {
			state.pushPage = val
		},
		setCommonData(state, val) {
			state.commonData = val
		}
	}
})
export default store